package com.woniuxy.controller;


import com.woniuxy.commons.utile.Result;
import com.woniuxy.dao.model.RepairArea;
import com.woniuxy.service.RepairAreaService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Keep it simple
 * @since 2022-06-28
 */
@RestController
@Api(tags = "区域处理接口")
public class RepairAreaController {

    @Resource
    RepairAreaService repairAreaService;

    @GetMapping("/getAllArea")
    @ApiOperation("获取全部区域信息")
    public Result getAllArea(){
        List<RepairArea> list = repairAreaService.list();
        return Result.instance().setData(list);
    }
}

